// 云函数入口文件
const cloud = require('wx-server-sdk')
cloud.init()
const DB = cloud.database()
const  _ = DB.command
// 云函数入口函数
exports.main = async (event, context) => {
  let bookinfo = event.bookinfo
  let isbn = bookinfo.isbn
  const xxx = "0" 
  DB.collection("lchbook").add({ 
    data: bookinfo,
    success : function(res) {xxx:"1"}
  })
  return xxx
}